import { reqGetCategory1 } from '@/api'
const actions = {
    // 获取一级目录的商品
    async getCategory1({ commit }, id) {
        let result = await reqGetCategory1(id)
        commit('GETCATEGORY1', result.result)
    }
}
const mutations = {
    GETCATEGORY1(state, category1) {
        state.category1 = category1
    }
}
const state = {
    category1: []
}
const getters = {}
export default {
    actions,
    mutations,
    state,
    getters
}